package codingforgreat.lchot150;

public class Lc026 {
    public int removeDuplicates(int[] nums) {
        int L = 0;
        for(int R = 1;R < nums.length;R++){
            if(nums[R] != nums[L]){
                nums[++L] = nums[R];
            }
        }
        return L + 1;
    }
}
